import 'package:flutter/cupertino.dart';

class BookHis {
  int id;
  String bookId;
  String bookName;
  String chaName;
  String chaId;
  String bookImage;

  BookHis({this.id, this.bookId,this.bookName, this.chaName, this.chaId, this.bookImage});
//
//  bool toggleCompleted() {
//    return !completed;
//  }

  Map<String, dynamic> toMap() {
    var map = Map<String, dynamic>();
    if (id != null) {
      map['id'] = id;
    }
    map['bookId'] = bookId;
    map['bookName'] = bookName;
    map['chaName'] = chaName;
    map['chaId'] = chaId;
    map['bookImage'] = bookImage;
    return map;
  }

  //  Extract a Task from a MAP object
  BookHis.fromMapObject(Map<String, dynamic> map) {
    this.id = map['id'];
    this.bookId = map['bookId'];
    this.bookName = map['bookName'];
    this.chaName = map['chaName'];
    this.chaId = map['chaId'];
    this.bookImage = map['bookImage'];
  }
}